﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace WPFCABShell.Shell.Interface.Services.Settings
{
	/// <summary>
	/// Provides services related to application settings.
	/// </summary>
	/// <remarks>
	/// <para>
	/// The settings service allows application settings to easily be stored and retrieved. Client code simply needs to request a
	/// named group of settings. If those settings do not yet exist, they will be created automatically. Thereafter, the client code
	/// can manipulate and save settings via the returned <see cref="ISettings"/> instance.
	/// </para>
	/// </remarks>
	public interface ISettingsService
	{
		/// <summary>
		/// Gets a group of settings by name.
		/// </summary>
		/// <remarks>
		/// <para>
		/// If the specified settings group does not exist, it will be created.
		/// </para>
		/// </remarks>
		/// <param name="name">
		/// The name of the settings to retrieve.
		/// </param>
		/// <returns>
		/// An <see cref="ISettings"/> implementation that allows manipulation of the settings.
		/// </returns>
		ISettings this[string name]
		{
			get;
		}

		/// <summary>
		/// Gets a group of settings by name.
		/// </summary>
		/// <param name="name">
		/// The name of the settings to retrieve.
		/// </param>
		/// <returns>
		/// An <see cref="ISettings"/> implementation that allows manipulation of the settings.
		/// </returns>
		ISettings GetSettings(string name);
	}
}
